package LineCode.Recruit2017.挖财;

import java.util.Scanner;

/**
 * 数列的第一项为n，以后各项为前一项的平方根，求数列的前m项的和。
 *
 */
public class 求数列的和 {

    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);
        int m,n;
        while (scanner.hasNext()) {
            n = scanner.nextInt();
            m = scanner.nextInt();
            Double fix = new Integer(n).doubleValue();
            Double result = 0.0;
            while (m-- != 0) {
                result += fix;
                fix = Math.sqrt(fix);
            }
            System.out.println(String.format("%.2f", result));

        }
    }

}
